*********************************************************************************
**********************************************************************************
*This README file contains guidance on how to to reproduce the tables and figures 
*in the paper "Trade and the Politics of Electoral Reform" by Micheal Becher and 
*Irene Menendez Gonzalez, accepted for publication in International Organization
*********************************************************************************
**********************************************************************************


This replication archive contains all material necessary to replicate
the results reported in the paper and its Online Appendix.

DATA FILES. The replication materials include the following analysis data files:

Votes.dta � This is the main cross-sectional district-level dataset for Switzerland 
on popular votes (including tariff, electoral reform, others) with variables on district characteristics 
from population census (1900, 1910, 1920) and 1905 firm census.

VotesPanel.dta  � Two-period panel data set with district-level popular vote on PR 
in 1910 and 1918 and controls from population census.

Reichstag.dta � Legislative voting dataset for the German Reichstag.

VotesMuni.dta � Municipal-level data set including 1903 tariff vote and 1910 PR vote.


CODEBOOK. The file Codebook.pdf provides a codebook for each data file.


CODE FILES. The replication materials include the following Stata code files 
to replicate the results, one code file for each dataset (see lookup below on what 
table and figure is reproduced by which code file): 

an_votes.do

an_panel_votes.do

an_Reichstag.do

an_votes_muni.do

STATA. All analyses were run in Stata 18 on Mac OS. The run time of each code file is less than 1 minute. It is recommended to execute each do file in one go (e.g., "do an_votes.do").

The following packages are required:

plausexog - sensitivity analysis for IV  (Online Appendix only) 
weakivtest - robust test for weak instruments (Online Appendix only) 
avar - asymptotic covariance estimation, required by weakivtest (Online Appendix only) 
   

FILE STRUCTURE. Save data files and code in same folder (and make it the working directory). Create a subfolder called "output", to which tables and figures will be written by default.

LOOKUP. Below is a lookup of tables, figures and the
files containing the statistical models producing them.

---------------------------------------------------------
TABLE           FILE
---------------------------------------------------------
Table 1         an_votes.do		 
Table 2        	an_panel_votes.do
Table 3       	an_Reichstag.do
Table A.1       an_votes.do
Table B.1       an_votes.do
Table B.2       an_votes.do
Table B.3       an_votes.do
Table B.4       an_votes.do
Table B.5       an_votes.do
Table B.6       an_votes.do
Table B.7       an_votes_muni.do
Table B.8       an_votes.do
---------------------------------------------------------


---------------------------------------------------------
FIGURE          FILE
---------------------------------------------------------
Figure B.1      an_votes.do
Figure B.2      an_votes.do
Figure B.3      an_votes.do